package org.codeart.decorator.loader;

public class Client {

    public static void main(String[] args) {
        String data = "{name: 洛必达, age: 18}";
        DataLoader dataLoader = new BaseFileDataLoader("data.txt");
//        dataLoader.write(data);
//        String s = dataLoader.read();
//        System.out.println(s);

        DataLoader dataLoader1 = new EncryptDecorator(dataLoader);
        dataLoader1.write(data);
        String s1 = dataLoader1.read();
        System.out.println(s1);
    }

}
